#!/bin/bash

set -e

if [[ -n "${GT_CHATTA_DEBUG}" ]]; then
    set -x
fi


function usage() {
    echo -n \
"Usage: $(basename "$0")
Turn up vagrant development environment
"
}

if [ "${BASH_SOURCE[0]}" = "${0}" ]; then
    if [ "${1:-}" = "--help" ]; then
        usage
    else
        vagrant up --provision
        vagrant ssh -c "cd /home/vagrant/geotrellis-chatta-demo && ./scripts/update"
    fi
fi
